Composite file system commands

ABSTRACT

Techniques for processing composite commands in a file system are disclosed. A file system receives a composite command that includes an argument. The file system parses the argument and encounters a particular flag indicating that the argument includes an additional command. The file system executes the additional command using an application programming interface (API).

INCORPORATION BY REFERENCE; DISCLAIMER

The following application is hereby incorporated by reference:application Ser. No. 15/471,267 filed on Mar. 28, 2017. The Applicanthereby rescinds any disclaimer of claim scope in the parentapplication(s) or the prosecution history thereof and advises the USPTOthat the claims in this application may be broader than any claim in theparent application(s).

TECHNICAL FIELD

The present disclosure relates to executing commands in a file system.In particular, the present disclosure relates to execution of compositecommands.

BACKGROUND

In computing, a file system is a structure and set of rules for storingand retrieving data. Data is grouped into units called files. The filesystem determines the structure of each file. The file system also isused to manage file metadata, i.e., data that provides additionalinformation about files. There are many different types of file systems,having many different file structures and rules. File systems may beused with many different types of storage devices and media, includinghard disks, flash media, optical drives, etc. In addition, file systemsmay be used with multiple storage devices. For example, a file systemmay store files using an array of hard drives or multiple storagedevices connected with each other via a computer network. Many differentconfigurations of file system storage exist.

Many file systems include an internal application programming interface(API) for executing commands in the file system. A user may access thefile system's API through a command line interface (CLI), where the usertypes commands in a terminal window. Alternatively, a user may accessthe file system's API through a graphical user interface (GUI) thatallows the user to manipulate graphical elements (e.g., windows, icons,etc.) to execute file system commands. Many file systems use astandardized API, such as one defined by the Portable OperatingInterface (POSIX) family of standards, or a variation thereof.

When a user attempts to execute a file system command, the file systemapplies internal rules (also known as authorization policies) todetermine whether the user is allowed to execute that command. Forexample, access to certain commands may be different for differentusers. In addition, access to certain files or groups of files (e.g.,directories or containers) may be different for different users. If aGUI is used to execute commands, it is important that the GUI adhere tothe file system's authorization policies, to prevent malicious orotherwise unwanted access to files. A GUI that does not properly adhereto the file system's authorization policies may introduce a securityvulnerability that threatens the proper operation of the file system andof applications and services using the file system.

The set of commands available in a typical file system API is limitedand predefined. Commands available in the file system may include read,write, execute, etc. Standard file system commands do not allow for morecomplicated types of data operations. For example, file systemstypically do not include commands for accessing features of cloudstorage, such as archiving, caching, etc.

For features not available through the file system directly, anapplication or service may be used that executes independently from thefile system. Using the separate application or service may involveaccessing a specialized GUI that provides access to the additionalfeatures. For example, a web application may be used to administerfeatures of a cloud service. However, as noted above, using aspecialized GUI may introduce security vulnerabilities, if the GUI doesnot properly adhere to the file system's authorization policies.Moreover, if some commands are executed in a CLI and other commands areexecuted via a GUI, user workflow may be negatively impacted due to thetime and inefficiency involved in switching computing contexts.

The approaches described in this section are approaches that could bepursued, but not necessarily approaches that have been previouslyconceived or pursued. Therefore, unless otherwise indicated, it shouldnot be assumed that any of the approaches described in this sectionqualify as prior art merely by virtue of their inclusion in thissection.

BRIEF DESCRIPTION OF THE DRAWINGS

The embodiments are illustrated by way of example and not by way oflimitation in the figures of the accompanying drawings. It should benoted that references to “an” or “one” embodiment in this disclosure arenot necessarily to the same embodiment, and they mean at least one. Inthe drawings:

FIG. 1 illustrates a system in accordance with one or more embodiments;

FIG. 2 illustrates a composite command in accordance with one or moreembodiments;

FIG. 3 illustrates an example set of operations for executing anembedded command in accordance with one or more embodiments;

FIGS. 4A to 4E illustrate examples of using embedded commands inaccordance with one or more embodiments; and

FIG. 5 shows a block diagram that illustrates a computer system inaccordance with one or more embodiments.

DETAILED DESCRIPTION

In the following description, for the purposes of explanation, numerousspecific details are set forth in order to provide a thoroughunderstanding. One or more embodiments may be practiced without thesespecific details. Features described in one embodiment may be combinedwith features described in a different embodiment. In some examples,well-known structures and devices are described with reference to ablock diagram form in order to avoid unnecessarily obscuring the presentinvention.

1. GENERAL OVERVIEW

2. SYSTEM ARCHITECTURE

3. COMPOSITE COMMAND ARCHITECTURE

4. PROCESSING A COMPOSITE COMMAND

5. EXAMPLE EMBODIMENTS OF EMBEDDED COMMANDS

6. COMPUTER NETWORKS AND CLOUD NETWORKS

7. MISCELLANEOUS; EXTENSIONS

8. HARDWARE OVERVIEW

1. General Overview

One or more embodiments include a file system configured to execute acomposite command. The file system receives the composite command, whichincludes a non-embedded command and an argument. The file system parsesthe argument. While parsing the argument, the file system encounters aparticular flag indicating that the argument includes an embeddedcommand. The file system executes the embedded command using anapplication programming interface (API).

In one or more embodiments, the embedded command is an internal commandof the file system, i.e., a command that is accessible via the filesystem's internal API. Alternatively, the embedded command may be anexternal command, i.e., a command of a system external to the filesystem. If the embedded command is an external command, then the filesystem calls the external system's API and receives a response. Theresponse may be used as input to the non-embedded command. Thenon-embedded command may be an internal command of the file system andmay be used in other commands that are not composite commands.

In one or more embodiments, the composite command's argument alsoincludes a system path. The file system may generate a symbolic linkfrom the system path to the embedded command. The file system mayreceive a subsequent command that references the symbolic link.Accessing the symbolic link may result in re-executing the embeddedcommand.

One or more embodiments described in this Specification and/or recitedin the claims may not be included in this General Overview section.

2. System Architecture

FIG. 1 illustrates a system 100 in accordance with one or moreembodiments. As illustrated in FIG. 1, system 100 includes a client 116,a file system 102, and an external system 118. In one or moreembodiments, the system 100 may include more or fewer components thanthe components illustrated in FIG. 1. The components illustrated in FIG.1 may be local to or remote from each other. The components illustratedin FIG. 1 may be implemented in software and/or hardware. Each componentmay be distributed over multiple applications and/or machines. Multiplecomponents may be combined into one application and/or machine.Operations described with respect to one component may instead beperformed by another component. Additional embodiments and/or examplesrelating to computer networks are described below in Section 6, titled“Computer Networks and Cloud Networks.”

In one or more embodiments, the file system 102 provides a structure andset of rules for storing and retrieving local data 104 in the system100. Specifically, the file system 102 includes a set of internalcommands 106 for storing and retrieving the local data 104. The internalcommands 106 are called ‘internal’ because they are part of the filesystem 102 itself, i.e., they are part of the file system 102's codebase. Different file systems include different sets of internalcommands. For example, file systems compliant with Portable OperatingSystem Interface (POSIX) standards include internal commands that areaccessible using operating system commands such as cat (to send thecontents of one or more files to standard output), chmod (to modify filepermissions), cp (to copy files), my (to move or rename a file), and rm(to delete a file or directory).

In one or more embodiments, the local data 104 is called ‘local’ becauseit is accessible using the internal commands 106. The term ‘local’ doesnot necessarily imply physical proximity. The local data 104 may bestored using any type of storage unit and/or device for storing data.Further, the local data 104 may include multiple different storage unitsand/or devices. The multiple different storage units and/or devices mayor may not be of the same type or located at the same physical site.Further, the local data 104 may be stored on the same computing systemas the file system 102. Alternatively or additionally, the local data104 may be stored on a computing system separate from the file system102. The local data 104 may be communicatively coupled to the filesystem 102 via a direct connection or via a network.

In one or more embodiments, the file system 102 is configured to receivecommands from a client 116. The client 116 is any kind of hardwareand/or software configured to use the file system 102 to store andretrieve the local data 104. For example, the client 116 may include acommand line interface (CLI) or graphical user interface through which auser issues commands to the file system 102. The file system 102receives commands from the client 116 via an internal applicationprogramming interface (API) 108. The internal API 108 is called‘internal’ because it is part of the file system 102 itself, i.e., it ispart of the file system 102's code base. Different file systems providedifferent internal APIs corresponding to the internal commandsavailable.

In one or more embodiments, the external system 118 is an application orservice that is not part of the file system 102's code base andtherefore executes separately (i.e., ‘externally’) from the file system102. Specifically, the external system 118 includes external commands120 that are not the internal commands 106 of the file system 102. Theexternal system 118 exposes the external commands 120 via an externalapplication programming interface (API) 122.

In one or more embodiments, the external commands 120 include commandsfor storing and retrieving the local data 104 in ways that are notsupported by the internal commands 106. Alternatively or additionally,the external commands may be used to store and/or retrieve remote data124. The remote data 124 is called ‘remote’ because it cannot be storedand/or retrieved using the file system 102's internal commands 106 inthe same manner as the local data 104. The term ‘remote’ does notnecessarily imply physical distance. The remote data 124 may be storedusing one or more different device(s) as the local data 104.Alternatively or additionally, the remote data 124 may be stored usingone or more of the same device(s) as the local data 104.

In one or more embodiments, the file system 102 includes a commandparser 110, a command execution engine 112, and/or a command dispatcher114. The command parser 110, command execution engine 112, and commanddispatcher 114 refer to functionality of the file system 102 that may beimplemented in any number of functional components of the file system102 (e.g., methods, functions, procedures, subroutines, etc.). There maybe overlap between one or more of the functional components used toimplement the command parser 110, command engine 112, and commanddispatcher 114. Alternatively, the command parser 110, command engine112, and command dispatcher 114 may be implemented as distinctfunctional components of the file system 102.

In one or more embodiments, the file system 102 is configured to processcomposite commands and embedded commands. When the file system 102receives a command from the client 116, the command parser 110 examinesthe command's syntax to identify which specific command(s) were issued.If a command is one of the internal commands 106, then the commandexecution engine 112 executes the command locally, i.e., within the filesystem 102's code base. If the command is a composite command, itincludes an embedded command. The embedded command may be one of theinternal commands 106 or one of the external commands 120. If theembedded command is one of the internal commands 106, then the commandexecution engine 112 executes the embedded command locally. If theembedded command is one of the external commands 120, then the commanddispatcher 114 dispatches the command to the external API 122 forprocessing by the external system 118. Examples of composite commandsand embedded commands are described below. Examples of operations forprocessing composite commands and embedded commands also are describedbelow.

In one or more embodiments, the file system 102 includes a plugininterface 126 through which API commands may be registered for use asembedded commands. Specifically, via the plugin interface 126, a commandgroup may register commands belonging to that command group and a uniqueidentifier (ID) for the command group. If the commands are implementedin a Java programming language, the command group may register a Javaclass containing the commands. For example, a command group providingaccess to cloud storage operations may register a Java class with theunique command group ID of “cloud” and commands such as“cloud-object-count,” “pending-uploads,” “cloud-checksum,” etc. Theplugin interface 126 may also be used to register help information to beoutput if a composite command is invalid. For example, an invalidcomposite command may include a command group ID without including anembedded command name, include an invalid embedded command name, etc.The help information may include, for example, a list of embeddedcommands associated with the command group.

In an embodiment, the system 100 is implemented on one or more digitaldevices. The term “digital device” generally refers to any hardwaredevice that includes a processor. A digital device may refer to aphysical device executing an application or a virtual machine. Examplesof digital devices include a computer, a tablet, a laptop, a desktop, anetbook, a server, a web server, a network policy server, a proxyserver, a generic machine, a function-specific hardware device, ahardware router, a hardware switch, a hardware firewall, a hardwarefirewall, a hardware network address translator (NAT), a hardware loadbalancer, a mainframe, a television, a content receiver, a set-top box,a printer, a mobile handset, a smartphone, a personal digital assistant(“PDA”), a wireless receiver and/or transmitter, a base station, acommunication management device, a router, a switch, a controller, anaccess point, and/or a client device.

3. Composite Command Architecture

FIG. 2 illustrates a composite command 200 in accordance with one ormore embodiments. The composite command 200 is a set of instructions tobe processed by a file system. For example, a file system may receivethe composite command 200 from a client, via an internal API, asdescribed above. In one or more embodiments, the composite command 200is a text command entered by a user in a command line interface (CLI).Components of the composite command 200 may refer to segments of text.Components of the composite command 200 may be ordered left-to-right asillustrated in FIG. 2. Alternatively or additionally, a differentordering may be used. In one or more embodiments, the composite command200 may include more or fewer components than the components illustratedin FIG. 2.

In one or more embodiments, the composite command 200 includes a commandname 202 and an argument 204. The command name 202 identifies a commandto be executed by the file system. Specifically, the command name 202may refer to an internal command of the file system. For example, in aPOSIX-compliant file system, the command name 202 may be the word ‘cat’.The command name 202 may refer to many different commands, depending onthe specific file system and the user's intentions.

In one or more embodiments, the argument 204 provides additionalinformation to be processed before, during, and/or after executing thecommand identified in the command name 202. Specifically, the argument204 may include a system path 206. The system path 206 indicates alocation in the file system where data may be stored and/or retrieved bythe command identified in the command name 202. In one or moreembodiments, the system path 206 indicates the location of a symboliclink. Examples of operations for generating and using a symbolic linkare described below.

In one or more embodiments, the composite command 200 is referred to as‘composite’ because the argument 204 includes an embedded command 210.As described in further detail below, the embedded command 210identifies a command separate from the command identified by the commandname 202. In contrast, a command with an argument that does not includean embedded command may be referred to as a ‘unary’ command.

In one or more embodiments, the argument 204 includes a flag 208. Theflag 208 indicates (i.e., ‘flags’) that the argument 204 includes theembedded command 210. If the composite command 200 is a text command,then the flag 208 may be a particular sequence of characters. Ingeneral, it may be preferable for the flag 208 to be a sequence ofcharacters that is unlikely to be used for other purposes in the filesystem. For example, the flag 208 may be a series of three colons(‘:::’). Many different sequences of characters may be used for the flag208. The flag 208 may be placed immediately to the left of the embeddedcommand 210 or in any other location in the argument 204 that willassist a command parser in identifying the embedded command 210.

In one or more embodiments, the argument 204 includes an embeddedcommand attribute 212. The embedded command attribute 212 may provideadditional information (i.e., one or more ‘attributes’) to help the filesystem process the embedded command 210. For example, an embeddedcommand attribute 212 may indicate a particular amount of time to waitbefore fully processing the embedded command 210. As another example,the attribute may indicate a background process that must finish beforefully processing the embedded command 210. Continuing with this example,a background process may be used to copy a file to a cloud storageservice. For a subsequent embedded command 210 to be dispatched to thecloud storage service, an embedded command attribute 212 may indicatethat the copy operation must finish before dispatching the embeddedcommand 210 to the cloud storage service. As another example, anembedded command attribute 212 may indicate a log level to use whileexecuting the embedded command 210. Continuing with this example, anembedded command attribute 212 of ‘DEBUG’ may provide a greater amountof log data than an embedded command attribute 212 of ‘INFO’. Otherexamples may include, for example, an embedded command designed todetermine the path of a file, given an associated file ID as an embeddedcommand attribute 212. Many different types of embedded commandattributes 212 may be used in association with many different types ofembedded commands 210.

In one or more embodiments, the embedded command attribute 212 isseparated from the embedded command 210 using a special character, suchas a colon. For example, an embedded diagnostic command to be executedusing a ‘DEBUG’ log level may be typed as ‘:::diag:log-level:DEBUG’. Inthis example, the three colons are a flag 208 as discussed above, ‘diag’is an embedded command name 216 as discussed below, and‘log-level:DEBUG’ is an embedded command attribute 212.

In one or more embodiments, the embedded command 210 includesinformation about a command to be processed by the file system, separatefrom the command identified by the command name 202. Specifically, theembedded command 210 includes an embedded command name 216 identifyingthe additional command. The embedded command name 216 may identify aninternal command of the file system. Alternatively or additionally, theembedded command name 216 may identify an external command, i.e., acommand that is part of an external system and accessible using anexternal API, as described above.

In one or more embodiments, commands that are accessible using anembedded command 210 are organized into command groups. The embeddedcommand 210 may include a command group identifier (ID) 214 identifyingthe particular command group corresponding to the embedded command name216. For example, commands used to store and retrieve data via a cloudstorage gateway (e.g., archiving, restoring, verifying checksums and/ordata integrity, checking the status of a local data cache, checking thestatus of other cloud storage-related commands, managing caching and/orpersistence policies for local data, managing encryption, managing filesegmentation policies, etc.) may be grouped into a command group withthe ID ‘archive’. Commands used to obtain metadata (e.g., informationabout files, objects, etc. stored in local data and/or remote data), maybe grouped into a command group with the ID ‘meta’. Commands used tomanage network resources may be grouped into a command group with the ID‘network’. Commands used to perform system diagnostics (e.g., testing,troubleshooting, checking available memory, starting and/or stoppingservices, checking the status of services and/or threads, changinglogging levels in a runtime environment, etc.) may be grouped into acommand group with the ID ‘diag’. Many different types of commands,groupings of commands, and IDs used to identify those groupings may beused. A command group ID 214 may be helpful, in particular, in anembodiment where commands with different functionality may have the sameembedded command name 216.

In one or more embodiments, the embedded command 210 includes anembedded argument 218. The embedded argument 218 provides additionalinformation to be processed before, during, and/or after executing thecommand identified in the embedded command name 216. For example, aswith the argument 204, the embedded argument 218 may include a systempath or an attribute to use before, during, and/or after executing thecommand identified in the embedded command name 216. Further, theembedded argument 218 may include an additional embedded command, andmay include an additional flag indicating that the embedded argument 218includes an additional embedded command. In other words, the compositecommand 200 may include multiple levels of nested embedded commands.

4. Processing a Composite Command

FIG. 3 illustrates an example set of operations for processing acomposite command in accordance with one or more embodiments. One ormore operations illustrated in FIG. 3 may be modified, rearranged, oromitted all together. Accordingly, the particular sequence of operationsillustrated in FIG. 3 should not be construed as limiting the scope ofone or more embodiments.

In one or more embodiments, a file system receives a command (Operation302). Specifically, the file system may receive the command from aclient, via an internal API. At the time the file system receives thecommand, it may not yet be known whether the command is a compositecommand (i.e., a command that includes an embedded command) or a unarycommand (i.e., a command that does not include an embedded command). Thefile system may receive the command while processing a user-definedscript. A script is a sequence of commands stored for repeated use. Forexample, UNIX operating systems support shell scripts that may be run bya command line interpreter. Scripts may be implemented using a varietyof different scripting languages.

In one or more embodiments, the file system parses the command(Operation 304). Parsing the command involves determining the componentsof the command based on a known command syntax. For example, the filesystem's command parser may expect commands in the form: [command-name][argument]. The command parser may also parse the argument to identifythe argument's components.

In one or more embodiments, the file system determines whether thecommand is a composite command (Operation 306). For example, the commandmay be a composite command if the command parser encounters a particularflag indicating that the command is a composite command. If the commandparser does not encounter the particular flag, then the command is aunary command.

In one or more embodiments, if the command is not a composite command,i.e., the command is a unary command, then the file system completes thecommand (Operation 320). Completing a unary command may involve simplyexecuting the command indicated by the command name, using the argumentprovided.

In one or more embodiments, if the file system determines that thecommand is a composite command (e.g., if the particular flag isencountered during command parsing), then the file system identifies theembedded command (Operation 308). Identifying the embedded commandinvolves identifying the embedded command name. If embedded commands areorganized into command groups, then identifying the embedded command mayalso involve identifying the command group identifier (ID).Alternatively or additionally, identifying the embedded command mayinvolve identifying an associated embedded command attribute. Forexample, the command parser may determine that the argument includes anembedded command attribute specifying a particular time at which toexecute the command indicated in the embedded command name.

In one or more embodiments, the file system determines whether anexternal call is needed to execute the embedded command (Operation 310).Specifically, if the embedded command name refers to an internalcommand, i.e., a command that is part of the file system's code base,then an external call may not be needed. The file system may execute theinternal command using its own command execution engine (Operation 314).Specifically, the file system may execute the internal command bycalling the file system's internal API. However, if the embedded commandname refers to an external command, i.e., a command that is not part ofthe file system's code base, then to execute the embedded command, thefile system may need to issue a call to an external API.

In one or more embodiments, when processing an external command, thefile system generates a symbolic link (Operation 312). Specifically, thefile system may generate a symbolic link between (a) the system pathprovided in the command and (b) the external command. Some file systemscache the results of executing a command, so that a subsequent call tothe same command may result in receiving the contents of the cacherather than re-executing the command. However, a file system may haveless aggressive caching (or no caching at all) of data returned viasymbolic links. Thus, accessing an external command via a symbolic linkmay provide a greater assurance of receiving current data each time. Ingeneral, using symbolic links in this manner may be helpful when usingexternal commands to access data that changes frequently. For example,an external command may return the status of an archive operation in acloud storage gateway. If the file system caches command results, then asubsequent call to the external command may result in receiving a cachedstatus of the archive operation, rather than re-executing the externalcommend to obtain the current status of the archive operation. Accessingthe external command via a symbolic link may ensure that the externalcommand is re-executed each time to obtain the current status of thearchive operation. Thus, in one or more embodiments, using a symboliclink improves operation of the file system by providing a symbolicallylinked system path that, when accessed, ensures that the data receivedin return is more current and therefore more useful. In addition, thefile system may generate a separate symbolic link each time it receivesa composite command, so that different users calling the same externalcommand do not receive each other's data.

In one or more embodiments, the file system executes the externalcommand by issuing a call to the external system (Operation 316).Specifically, the file system calls an external API of the externalsystem. When the external system has executed the external command, thefile system receives a response from the external system (Operation318). Many different types of response may be received. For example, ifthe external system is a cloud storage gateway, a call to execute anarchive command may return information about the status of an archiveoperation. A call to retrieve data from a cloud storage gateway mayreturn a stream of the data requested. A call to provide metadataassociated with the external system may include the metadata. If thecall to the external system is not properly formatted, or the filesystem lacks appropriate authorization, or the external command cannotbe executed for some other reason, the call may return an error message.In general, in one or more embodiments, the call to the external systemreturns data that would not have been accessible using only internalcommands of the file system itself. Thus, one or more embodimentsimprove functioning of the file system by providing access to externaldata and/or functionality that would not have otherwise been available,using a composite command issued to the file system itself.

In one or more embodiments, after executing an embedded internal command(Operation 314) or an embedded external command (Operations 312, 316,318), the file system completes the command 220. In the case of acomposite command, completing the command may involve executing thenon-embedded command. Executing the non-embedded command may involveusing the results of the embedded command as input to the non-embeddedcommand. For example, if the file system is POSIX-compliant and thenon-embedded command is ‘cat’, then the file system may dump the resultsof the embedded command to standard output. The results of an embeddedcommand may be used as input to a non-embedded command in many differentways.

In one or more embodiments, composite commands as described herein mayimprove functioning of a file system in various ways. For example, asnoted above, allowing a composite command to include an embeddedexternal command may provide access to external data and/orfunctionality that would not have otherwise been available via the filesystem. As another example, using composite commands may improvesecurity of the file system, because commands issued via the file systemare subject to the file system's authorization policies. As noted above,a separate GUI or other specialized interface may not properly adhere tothe file system's authorization policies. As another example, usingcomposite commands may improve user workflow by avoiding the need forthe user to exit the file system's CLI to access a GUI or otherspecialized interface for executing external commands.

5. Example Embodiments of Embedded Commands

A detailed example is described below for purposes of clarity.Components and/or operations described below should be understood as onespecific example which may not be applicable to certain embodiments.Accordingly, components and/or operations described below should not beconstrued as limiting the scope of any of the claims.

FIG. 4A shows an illustration of an example of a composite command 402in accordance with one or more embodiments. Using the terminologydescribed above with reference to composite command architecture, thecommand name is ‘cat’, the system path is ‘/users/john/documents/file1’,the flag is the command group identifier (ID) is ‘archive’, and theembedded command name is ‘restore’. In this example, the compositecommand 402 results in the file system calling a cloud storage gatewayto restore data, i.e., copy remote data to local data. The file systemgenerates a symbolic link from the file path to the restore command.Because the non-embedded command is ‘cat’, when the file system receivesa response from the cloud storage gateway, the file system dumps theresponse to standard output. For example, the response may be a messageindicating that the restore command has commenced. In this context, the‘cat’ command effectively functions as a read operation.

Continuing the example, FIG. 4B shows an illustration of an example of acomposite command 404 in accordance with one or more embodiments. Usingthe terminology described above with reference to composite commandarchitecture, the command name is ‘cat’, the system path is‘/users/john/documents/file1’, the flag is the command group identifier(ID) is ‘archive’, and the embedded command name is ‘restore-status’. Inthis example, the composite command 404 results in the file systemcalling the cloud storage gateway to determine the status of the restorecommand of FIG. 4A. Because the non-embedded command is ‘cat’, when thefile system receives a response from the cloud storage gateway, the filesystem dumps the response to standard output. For example, the responsemay be a message indicating that the restore command is fifty percentcomplete.

Continuing the example, FIG. 4C shows an example of a composite command406 in accordance with one or more embodiments. Using the terminologydescribed above with reference to composite command architecture, thecommand name is ‘cat’, the system path is ‘/users/john/documents/file1’,the flag is the command group identifier (ID) is ‘archive’, and theembedded command name is ‘archive’. In this example, supposing that therestore command of FIG. 4A is complete, the composite command 406results in the file system calling the cloud storage gateway to archivelocal data to remote data. Because the non-embedded command is ‘cat’,when the file system receives a response from the cloud storage gateway,the file system dumps the response to standard output. For example, theresponse may be a message indicating that the archive command hascommenced.

Continuing the example, FIG. 4D shows an illustration of an example of acomposite command 408 in accordance with one or more embodiments. Usingthe terminology described above with reference to composite commandarchitecture, the command name is ‘cat’, the system path is‘/users/john/documents/file1’, the flag is the command group identifier(ID) is ‘archive’, and the embedded command name is ‘archive-status’. Inthis example, the composite command 404 results in the file systemcalling the cloud storage gateway to determine the status of the archivecommand of FIG. 4C. Because the non-embedded command is ‘cat’, when thefile system receives a response from the cloud storage gateway, the filesystem dumps the response to standard output. For example, the responsemay be a message indicating that the archive command is complete.

FIG. 4E shows an illustration of an example of a composite command 410in accordance with one or more embodiments. In this example, thecomposite command 410 is invalid, because it includes a command group ID(‘cache’) but does not include a corresponding embedded command name.Attempting to execute the invalid composite command 410 (for example, byentering the composite command 410 using a CLI) may result in receivinghelp information 412. For example, as shown in FIG. 4E, help information412 may include a list of commands that are associated with thedesignated command group ID.

6. Computer Networks and Cloud Networks

In one or more embodiments, a computer network provides connectivityamong a set of nodes. The nodes may be local to and/or remote from eachother. The nodes are connected by a set of links. Examples of linksinclude a coaxial cable, an unshielded twisted cable, a copper cable, anoptical fiber, and a virtual link.

A subset of nodes implements the computer network. Examples of suchnodes include a switch, a router, a firewall, and a network addresstranslator (NAT). Another subset of nodes uses the computer network.Such nodes (also referred to as “hosts”) may execute a client processand/or a server process. A client process makes a request for acomputing service (such as, execution of a particular application,and/or storage of a particular amount of data). A server processresponds by executing the requested service and/or returningcorresponding data.

A computer network may be a physical network, including physical nodesconnected by physical links. A physical node is any digital device. Aphysical node may be a function-specific hardware device, such as ahardware switch, a hardware router, a hardware firewall, and a hardwareNAT. Additionally or alternatively, a physical node may be a genericmachine that is configured to execute various virtual machines and/orapplications performing respective functions. A physical link is aphysical medium connecting two or more physical nodes. Examples of linksinclude a coaxial cable, an unshielded twisted cable, a copper cable,and an optical fiber.

A computer network may be an overlay network. An overlay network is alogical network implemented on top of another network (such as, aphysical network). Each node in an overlay network corresponds to arespective node in the underlying network. Hence, each node in anoverlay network is associated with both an overlay address (to addressto the overlay node) and an underlay address (to address the underlaynode that implements the overlay node). An overlay node may be a digitaldevice and/or a software process (such as, a virtual machine, anapplication instance, or a thread) A link that connects overlay nodes isimplemented as a tunnel through the underlying network. The overlaynodes at either end of the tunnel treat the underlying multi-hop pathbetween them as a single logical link. Tunneling is performed throughencapsulation and decapsulation.

In an embodiment, a client may be local to and/or remote from a computernetwork. The client may access the computer network over other computernetworks, such as a private network or the Internet. The client maycommunicate requests to the computer network using a communicationsprotocol, such as Hypertext Transfer Protocol (HTTP). The requests arecommunicated through an interface, such as a client interface (such as aweb browser), a program interface, or an application programminginterface (API).

In an embodiment, a computer network provides connectivity betweenclients and network resources. Network resources include hardware and/orsoftware configured to execute server processes. Examples of networkresources include a processor, a data storage, a virtual machine, acontainer, and/or a software application. Network resources are sharedamongst multiple clients. Clients request computing services from acomputer network independently of each other. Network resources aredynamically assigned to the requests and/or clients on an on-demandbasis. Network resources assigned to each request and/or client may bescaled up or down based on, for example, (a) the computing servicesrequested by a particular client, (b) the aggregated computing servicesrequested by a particular tenant, and/or (c) the aggregated computingservices requested of the computer network. Such a computer network maybe referred to as a “cloud network.”

In an embodiment, a service provider provides a cloud network to one ormore end users. Various service models may be implemented by the cloudnetwork, including but not limited to Software-as-a-Service (SaaS),Platform-as-a-Service (PaaS), and Infrastructure-as-a-Service (IaaS). InSaaS, a service provider provides end users the capability to use theservice provider's applications, which are executing on the networkresources. In PaaS, the service provider provides end users thecapability to deploy custom applications onto the network resources. Thecustom applications may be created using programming languages,libraries, services, and tools supported by the service provider. InIaaS, the service provider provides end users the capability toprovision processing, storage, networks, and other fundamental computingresources provided by the network resources. Any arbitrary applications,including an operating system, may be deployed on the network resources.

In an embodiment, various deployment models may be implemented by acomputer network, including but not limited to a private cloud, a publiccloud, and a hybrid cloud. In a private cloud, network resources areprovisioned for exclusive use by a particular group of one or moreentities (the term “entity” as used herein refers to a corporation,organization, person, or other entity). The network resources may belocal to and/or remote from the premises of the particular group ofentities. In a public cloud, cloud resources are provisioned formultiple entities that are independent from each other (also referred toas “tenants” or “customers”). The computer network and the networkresources thereof are accessed by clients corresponding to differenttenants. Such a computer network may be referred to as a “multi-tenantcomputer network.” Several tenants may use a same particular networkresource at different times and/or at the same time. The networkresources may be local to and/or remote from the premises of thetenants. In a hybrid cloud, a computer network comprises a private cloudand a public cloud. An interface between the private cloud and thepublic cloud allows for data and application portability. Data stored atthe private cloud and data stored at the public cloud may be exchangedthrough the interface. Applications implemented at the private cloud andapplications implemented at the public cloud may have dependencies oneach other. A call from an application at the private cloud to anapplication at the public cloud (and vice versa) may be executed throughthe interface.

In an embodiment, tenants of a multi-tenant computer network areindependent of each other. For example, a business or operation of onetenant may be separate from a business or operation of another tenant.Different tenants may demand different network requirements for thecomputer network. Examples of network requirements include processingspeed, amount of data storage, security requirements, performancerequirements, throughput requirements, latency requirements, resiliencyrequirements, Quality of Service (QoS) requirements, tenant isolation,and/or consistency. The same computer network may need to implementdifferent network requirements demanded by different tenants.

In one or more embodiments, in a multi-tenant computer network, tenantisolation is implemented to ensure that the applications and/or data ofdifferent tenants are not shared with each other. Various tenantisolation approaches may be used.

In an embodiment, each tenant is associated with a tenant ID. Eachnetwork resource of the multi-tenant computer network is tagged with atenant ID. A tenant is permitted access to a particular network resourceonly if the tenant and the particular network resources are associatedwith a same tenant ID.

In an embodiment, each tenant is associated with a tenant ID. Eachapplication, implemented by the computer network, is tagged with atenant ID. Additionally or alternatively, each data structure and/ordataset, stored by the computer network, is tagged with a tenant ID. Atenant is permitted access to a particular application, data structure,and/or dataset only if the tenant and the particular application, datastructure, and/or dataset are associated with a same tenant ID.

As an example, each database implemented by a multi-tenant computernetwork may be tagged with a tenant ID. Only a tenant associated withthe corresponding tenant ID may access data of a particular database. Asanother example, each entry in a database implemented by a multi-tenantcomputer network may be tagged with a tenant ID. Only a tenantassociated with the corresponding tenant ID may access data of aparticular entry. However, the database may be shared by multipletenants.

In an embodiment, a subscription list indicates which tenants haveauthorization to access which applications. For each application, a listof tenant IDs of tenants authorized to access the application is stored.A tenant is permitted access to a particular application only if thetenant ID of the tenant is included in the subscription listcorresponding to the particular application.

In an embodiment, network resources (such as digital devices, virtualmachines, application instances, and threads) corresponding to differenttenants are isolated to tenant-specific overlay networks maintained bythe multi-tenant computer network. As an example, packets from anysource device in a tenant overlay network may only be transmitted toother devices within the same tenant overlay network. Encapsulationtunnels are used to prohibit any transmissions from a source device on atenant overlay network to devices in other tenant overlay networks.Specifically, the packets, received from the source device, areencapsulated within an outer packet. The outer packet is transmittedfrom a first encapsulation tunnel endpoint (in communication with thesource device in the tenant overlay network) to a second encapsulationtunnel endpoint (in communication with the destination device in thetenant overlay network). The second encapsulation tunnel endpointdecapsulates the outer packet to obtain the original packet transmittedby the source device. The original packet is transmitted from the secondencapsulation tunnel endpoint to the destination device in the sameparticular overlay network.

7. Miscellaneous; Extensions

Embodiments are directed to a system with one or more devices thatinclude a hardware processor and that are configured to perform any ofthe operations described herein and/or recited in any of the claimsbelow.

In an embodiment, a non-transitory computer readable storage mediumcomprises instructions which, when executed by one or more hardwareprocessors, causes performance of any of the operations described hereinand/or recited in any of the claims.

Any combination of the features and functionalities described herein maybe used in accordance with one or more embodiments. In the foregoingspecification, embodiments have been described with reference tonumerous specific details that may vary from implementation toimplementation. The specification and drawings are, accordingly, to beregarded in an illustrative rather than a restrictive sense. The soleand exclusive indicator of the scope of the invention, and what isintended by the applicants to be the scope of the invention, is theliteral and equivalent scope of the set of claims that issue from thisapplication, in the specific form in which such claims issue, includingany subsequent correction.

8. Hardware Overview

According to one embodiment, the techniques described herein areimplemented by one or more special-purpose computing devices. Thespecial-purpose computing devices may be hard-wired to perform thetechniques, or may include digital electronic devices such as one ormore application-specific integrated circuits (ASICs), fieldprogrammable gate arrays (FPGAs), or network processing units (NPUs)that are persistently programmed to perform the techniques, or mayinclude one or more general purpose hardware processors programmed toperform the techniques pursuant to program instructions in firmware,memory, other storage, or a combination. Such special-purpose computingdevices may also combine custom hard-wired logic, ASICs, FPGAs, or NPUswith custom programming to accomplish the techniques. Thespecial-purpose computing devices may be desktop computer systems,portable computer systems, handheld devices, networking devices or anyother device that incorporates hard-wired and/or program logic toimplement the techniques.

For example, FIG. 5 is a block diagram that illustrates a computersystem 500 upon which an embodiment of the invention may be implemented.Computer system 500 includes a bus 502 or other communication mechanismfor communicating information, and a hardware processor 504 coupled withbus 502 for processing information. Hardware processor 504 may be, forexample, a general purpose microprocessor.

Computer system 500 also includes a main memory 506, such as a randomaccess memory (RAM) or other dynamic storage device, coupled to bus 502for storing information and instructions to be executed by processor504. Main memory 506 also may be used for storing temporary variables orother intermediate information during execution of instructions to beexecuted by processor 504. Such instructions, when stored innon-transitory storage media accessible to processor 504, rendercomputer system 500 into a special-purpose machine that is customized toperform the operations specified in the instructions.

Computer system 500 further includes a read only memory (ROM) 508 orother static storage device coupled to bus 502 for storing staticinformation and instructions for processor 504. A storage device 510,such as a magnetic disk or optical disk, is provided and coupled to bus502 for storing information and instructions.

Computer system 500 may be coupled via bus 502 to a display 512, such asa cathode ray tube (CRT), for displaying information to a computer user.An input device 514, including alphanumeric and other keys, is coupledto bus 502 for communicating information and command selections toprocessor 504. Another type of user input device is cursor control 516,such as a mouse, a trackball, or cursor direction keys for communicatingdirection information and command selections to processor 504 and forcontrolling cursor movement on display 512. This input device typicallyhas two degrees of freedom in two axes, a first axis (e.g., x) and asecond axis (e.g., y), that allows the device to specify positions in aplane.

Computer system 500 may implement the techniques described herein usingcustomized hard-wired logic, one or more ASICs or FPGAs, firmware and/orprogram logic which in combination with the computer system causes orprograms computer system 500 to be a special-purpose machine. Accordingto one embodiment, the techniques herein are performed by computersystem 500 in response to processor 504 executing one or more sequencesof one or more instructions contained in main memory 506. Suchinstructions may be read into main memory 506 from another storagemedium, such as storage device 510. Execution of the sequences ofinstructions contained in main memory 506 causes processor 504 toperform the process steps described herein. In alternative embodiments,hard-wired circuitry may be used in place of or in combination withsoftware instructions.

The term “storage media” as used herein refers to any non-transitorymedia that store data and/or instructions that cause a machine tooperate in a specific fashion. Such storage media may comprisenon-volatile media and/or volatile media. Non-volatile media includes,for example, optical or magnetic disks, such as storage device 510.Volatile media includes dynamic memory, such as main memory 506. Commonforms of storage media include, for example, a floppy disk, a flexibledisk, hard disk, solid state drive, magnetic tape, or any other magneticdata storage medium, a CD-ROM, any other optical data storage medium,any physical medium with patterns of holes, a RAM, a PROM, and EPROM, aFLASH-EPROM, NVRAM, any other memory chip or cartridge,content-addressable memory (CAM), and ternary content-addressable memory(TCAM).

Storage media is distinct from but may be used in conjunction withtransmission media. Transmission media participates in transferringinformation between storage media. For example, transmission mediaincludes coaxial cables, copper wire and fiber optics, including thewires that comprise bus 502. Transmission media can also take the formof acoustic or light waves, such as those generated during radio-waveand infra-red data communications.

Various forms of media may be involved in carrying one or more sequencesof one or more instructions to processor 504 for execution. For example,the instructions may initially be carried on a magnetic disk or solidstate drive of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 500 canreceive the data on the telephone line and use an infra-red transmitterto convert the data to an infra-red signal. An infra-red detector canreceive the data carried in the infra-red signal and appropriatecircuitry can place the data on bus 502. Bus 502 carries the data tomain memory 506, from which processor 504 retrieves and executes theinstructions. The instructions received by main memory 506 mayoptionally be stored on storage device 510 either before or afterexecution by processor 504.

Computer system 500 also includes a communication interface 518 coupledto bus 502. Communication interface 518 provides a two-way datacommunication coupling to a network link 520 that is connected to alocal network 522. For example, communication interface 518 may be anintegrated services digital network (ISDN) card, cable modem, satellitemodem, or a modem to provide a data communication connection to acorresponding type of telephone line. As another example, communicationinterface 518 may be a local area network (LAN) card to provide a datacommunication connection to a compatible LAN. Wireless links may also beimplemented. In any such implementation, communication interface 518sends and receives electrical, electromagnetic or optical signals thatcarry digital data streams representing various types of information.

Network link 520 typically provides data communication through one ormore networks to other data devices. For example, network link 520 mayprovide a connection through local network 522 to a host computer 524 orto data equipment operated by an Internet Service Provider (ISP) 526.ISP 526 in turn provides data communication services through the worldwide packet data communication network now commonly referred to as the“Internet” 528. Local network 522 and Internet 528 both use electrical,electromagnetic or optical signals that carry digital data streams. Thesignals through the various networks and the signals on network link 520and through communication interface 518, which carry the digital data toand from computer system 500, are example forms of transmission media.

Computer system 500 can send messages and receive data, includingprogram code, through the network(s), network link 520 and communicationinterface 518. In the Internet example, a server 530 might transmit arequested code for an application program through Internet 528, ISP 526,local network 522 and communication interface 518.

The received code may be executed by processor 504 as it is received,and/or stored in storage device 510, or other non-volatile storage forlater execution.

In the foregoing specification, embodiments of the invention have beendescribed with reference to numerous specific details that may vary fromimplementation to implementation. The specification and drawings are,accordingly, to be regarded in an illustrative rather than a restrictivesense. The sole and exclusive indicator of the scope of the invention,and what is intended by the applicants to be the scope of the invention,is the literal and equivalent scope of the set of claims that issue fromthis application, in the specific form in which such claims issue,including any subsequent correction.

What is claimed is:
 1. One or more non-transitory computer-readablemedia storing instructions, which when executed by one or more hardwareprocessors, cause performance of operations comprising: receiving, by afile system, a first command comprising a command name, a flag, and afirst argument, wherein the flag is stored separately from the firstargument; while parsing the first command, encountering the flagindicating that the first argument, of the first command, comprises asecond command; executing, by the file system, the second command toobtain results corresponding to the second command; and executing thefirst command using the results corresponding to the second command. 2.The one or more media of claim 1, wherein the second command isdifferent than the first command identified by the command name.
 3. Theone or more media of claim 1, wherein the first argument furthercomprises a system path that stores instructions that, when executed byone or more processors, cause generating a symbolic link from the systempath to the second command.
 4. The one or more media of claim 3, furthercomprising accessing the symbolic link, the accessing causingre-execution the second command.
 5. The one or more media of claim 1,wherein the second command comprises a command group identifier and asecond command name.
 6. The one or more media of claim 1, wherein thefirst command is executed by a first system and the second command isexecuted by a second system different from the first system.
 7. The oneor more media of claim 1, wherein the first command and the secondcommand are executed by a same system.
 8. The one or more media of claim1, wherein the flag comprises a sequence of characters reserved forindicating the second command in the first argument of the firstcommand, the sequence of characters between the command name and thesecond command.
 9. The one or more media of claim 1, wherein the secondcommand further comprises a second command name and a command attributespecifying one or more criteria for the executing of the second command.10. The one or more media of claim 9, wherein the second command furthercomprises an attribute character reserved for indicating the commandattribute within the second command, the attribute character between thesecond command name and the command attribute.
 11. One or morenon-transitory computer-readable media storing instructions, which whenexecuted by one or more hardware processors, cause performance ofoperations comprising: receiving, by a file system, a command that isone of a unary command or a compound command; determining whether thecommand is a compound command or a unary command based on detecting aflag present in the compound command and not present in the unarycommand; responsive to detecting the flag, identifying within thecompound command a first command comprising a command name and anargument, and further detecting a second command embedded in theargument of the first command; executing the second command to obtainsecond command results; and executing the first command using the secondcommand results.
 12. The one or more media of claim 11, wherein thefirst command and the second command are different.
 13. The one or moremedia of claim 11, wherein the argument of the first command furthercomprises a system path that stores instructions that, when executed byone or more processors, cause generating a symbolic link from the systempath to the second command.
 14. The one or more media of claim 13,further comprising accessing the symbolic link, the accessing causingre-execution the second command.
 15. The one or more media of claim 11,wherein the second command comprises a command group identifier and asecond command name.
 16. The one or more media of claim 11, wherein thefirst command is executed by a first system and the second command isexecuted by a second system different from the first system.
 17. The oneor more media of claim 11, wherein the first command and the secondcommand are executed by a same system.
 18. The one or more media ofclaim 11, wherein the flag comprises a sequence of characters reservedfor indicating the second command in the argument of the first command,the sequence of characters between the command name and the secondcommand.
 19. The one or more media of claim 11, wherein the secondcommand further comprises a second command name and a command attributespecifying one or more criteria for the executing of the second command.20. The one or more media of claim 19, wherein the second commandfurther comprises an attribute character reserved for indicating thecommand attribute within the second command, the attribute characterbetween the second command name and the command attribute.